ver.20211220
一般用户一般情况真的不太会要用到命令行 (手打参数就够烦了居然还要我敲命令???) 这里只介绍一些可能有一点点卵用的特殊操作
mpv.com 是命令行程序,它需要 mpv.exe 才能运行 ( mpv.exe 是伪GUI的程序,它不需要 mpv.com 就能运行)
cmd 或者 powershell 都可以使用
资源管理器定位到 mpv.com 所在目录,以下基于懒人包20210617版开始演示。
shift + 鼠标右键 → 此处打开powershell其它的打开姿势:资管管理器的地址栏改成 wt 或 cmd 或 powershell 回车即可
./mpv 回车以执行,将输出类似下图的信息
说明一切检验正常
(建议使用用户变量而不是系统变量)

mpv 就能得到检验信息注意:懒人包还内含了FFmpeg、Python、VapourSynth、youtube-dl和yt-dlp这些程序,添加那个目录到变量也会让它们被系统识别
如果之前用类似的方法安装过上述程序,可能会造成混乱,自行剔除重复组件即可。

引用:https://mpv.io/manual/master/#usage (以下皆以 常驻使用 为前提进行演示)
命令行接受的mpv的格式如下
1mpv [options] [file|URL|PLAYLIST|-]2mpv [options] files即 “mpv 参数选项(多个) 文件/网址”
导入的每个参数必须前置 -- ;参数之间用空格分离;导入的参数会覆盖 mpv.conf 中的设置
xxxxxxxxxx11mpv C:\Users\hooke\Videos\video.mp4
此时mpv使用 portable_config 文件夹作为设置目录运行并载入指定的视频,在终端显示一些基础的运行信息
xxxxxxxxxx11mpv --ytdl=yes https://www.bilibili.com/video/BV1Vp4y1D7i1
使用 --ytdl=yes 参数选项的目的是直接交给ytdl处理以减少解析时间(对于网址通常mpv会自己先解析,失败后再尝试ytdl)
即便如此可能还是要等上几秒才能弹出播放框
P.S. 我相信没人会想尝试这返祖的操作,直接打开 mpv.exe 然后拖入网址不就完事了。
因为 portable_config 文件夹的存在使得命令行启动mpv会自动读取该设置文件夹 如果你只想启动一个初始设置的mpv,无需删除该文件夹,只需要使用类似如下的命令:
xxxxxxxxxx11mpv --config=no --idle=yes --force-window=yes--no-config 是只能在命令行使用的参数,启用后将不读取任何设置文件夹。
--idle=yes 是只能在命令行使用的参数,启用后将强制其在打开状态。
--force-window=yes 是只能在命令行使用的参数,启用后将创建一个窗口程序。
P.S. 直接运行 "mpv-纯净模式.bat" 也有类似效果
并不需要改动 mpv.conf ,使用如下命令即可:
xxxxxxxxxx11mpv --log-file=~~desktop/xxxx.log 视频.mp4或者在mpv的初始设置下输出日志:
xxxxxxxxxx11mpv --no-config --log-file=~~desktop/xxxx.log 视频.mp4以 =help 为关键字检索mpv的官方手册,会发现大量信息被藏在了这些命令中,按照手册说明也只能从命令行读取。
(此处仅举例,所有可用的见最下方的 “拓展官方手册” 或直接搜索官方手册)
使用如下命令获取所有可用的内置放大算法:
xxxxxxxxxx11mpv --scale=help
。。。
P.S. 手册 [04] 中的 “指定和切换音频输出设备” 和 手册 [02] 中的 “基本操作” 也有提及这类用法
即便官方手册没有说明,一些选项依旧可以使用 =help 寻找那些出于奇怪的原因,没有被展示的信息/参数选项。
例如使用如下命令获取本机隐藏的可用的硬解码模式:
xxxxxxxxxx11mpv --hwdec=help
。。。
例如使用mpv简易快速转码源mp4到mkv:
xxxxxxxxxx11mpv --o=视频.mkv C:\Users\hooke\Videos\video.mp4
--o 参数应指定具体路径,否则会在 powershell 的当前工作目录输出。
编码模式下不会读取设置文件夹,此模式下的实际可用参数参考:https://mpv.io/manual/master/#encoding
P.S. 为什么不用更好更强大的 FFmpeg 呢? https://ffmpeg.org/
ffmpeg -i C:\Users\hooke\Videos\video.mp4 视频.mkv
xxxxxxxxxx371--profile=help2--vd=help3--audio-device=help4--ad=help5--audio-demuxer=help6--audio-channels=help7--sub-demuxer=help8--demuxer=help9--demuxer-rawaudio-format=help10--demuxer-rawvideo-mp-format=help11--sws-scaler=help12--scale=help13--tscale=help14--scale-window=help15--error-diffusion=help16--vulkan-device=help17--vulkan-display-display=help18--vulkan-display-mode=help19--vulkan-display-plane=help20--ao=help21--vo=help22--drm-connector=help23--drm-mode=help24--af=help25--af=format=format=help26--af=rubberband=help27--vf=help28--vf=<filter>=help29--vf=format=fmt=help30--vf=format:stereo-in=help31--of=help32--ofopts=help33--oac=help34--oacopts=help35--ovc=help36--ovcopts=help37--audio-device=help| 内置可选算法⇓ 通用参数⇒ | scale dscale cscale | tscale | dither | error-diffusion |
|---|---|---|---|---|
| bilinear | ☑ | |||
| bicubic_fast | ☑ | |||
| oversample | ☑ | ☑ | ||
| linear | ☑ | |||
| spline16 | ☑ | ☑ | ||
| spline36 | ☑ | ☑ | ||
| spline64 | ☑ | ☑ | ||
| sinc | ☑ | ☑ | ||
| lanczos | ☑ | ☑ | ||
| ginseng | ☑ | ☑ | ||
| jinc | ☑ | |||
| ewa_lanczos | ☑ | |||
| ewa_hanning | ☑ | |||
| ewa_ginseng | ☑ | |||
| ewa_lanczossharp | ☑ | |||
| ewa_lanczossoft | ☑ | |||
| haasnsoft | ☑ | |||
| bicubic | ☑ | ☑ | ||
| bcspline | ☑ | ☑ | ||
| catmull_rom | ☑ | ☑ | ||
| mitchell | ☑ | ☑ | ||
| robidoux | ☑ | ☑ | ||
| robidouxsharp | ☑ | ☑ | ||
| ewa_robidoux | ☑ | |||
| ewa_robidouxsharp | ☑ | |||
| box | ☑ | ☑ | ||
| nearest | ☑ | ☑ | ||
| triangle | ☑ | ☑ | ||
| gaussian | ☑ | ☑ | ||
| bartlett | ☑ | ☑ | ||
| hanning | ☑ | ☑ | ||
| tukey | ☑ | ☑ | ||
| hamming | ☑ | ☑ | ||
| quadric | ☑ | ☑ | ||
| welch | ☑ | ☑ | ||
| kaiser | ☑ | ☑ | ||
| blackman | ☑ | ☑ | ||
| sphinx | ☑ | ☑ | ||
| fruit | ☑ | |||
| ordered | ☑ | |||
| error-diffusion | ☑ | |||
| simple | ☑ | |||
| false-fs | ☑ | |||
| sierra-lite | ☑ | |||
| floyd-steinberg | ☑ | |||
| atkinson | ☑ | |||
| jarvis-judice-ninke | ☑ | |||
| stucki | ☑ | |||
| burkes | ☑ | |||
| sierra-3 | ☑ | |||
| sierra-2 | ☑ |